const {defineConfig} = require('@vue/cli-service')
const webpack = require('webpack')
module.exports = defineConfig({
  transpileDependencies: true,
  // 关闭组件命名报错
  lintOnSave: false,
  devServer: {
    port: 80,
    // 配置跨域代理
    proxy: {
      '/api': {
        target: 'http://localhost:8080',  // api 服务地址
        changeOrigin: true,
        rewrites: {
          '^/api':'',
        }
      }
    }
  },
  configureWebpack: {
    plugins: [
      new webpack.ProvidePlugin({
          $: 'jquery',
          jQuery: 'jquery',
          'windows.jQuery': 'jquery'
      })
    ]
  },
})
